package com.gidgabs.dto;

import com.gidgabs.modules.entity.TbProductEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@ApiModel("产品数据")
public class TbProductDto {
    private static final long serialVersionUID = 1L;

    //
    @ApiModelProperty(value = "产品id",hidden = true)
    private Integer productId;
    //用户id
    @ApiModelProperty("用户id")
    private Integer userId;
    //用户编号
    @ApiModelProperty("用户编号")
    private String productCode;
    //产品名称
    @ApiModelProperty("产品名称")
    private String productName;
    //产品单位
    @ApiModelProperty("产品单位")
    private String unit;
    //产品原价
    @ApiModelProperty("产品原价")
    private Integer price;
    //产品当前价格
    @ApiModelProperty("产品当前价格")
    private Integer productPrice;
    //产品运费
    @ApiModelProperty("产品运费")
    private Integer sendPrice;
    //产品库存
    @ApiModelProperty("产品库存")
    private Integer stock;
    //产品类型 1 journal 日志 2 advertisement 广告产品
    @ApiModelProperty("产品类型")
    private Integer productType;
    //产品分类字典表id
    @ApiModelProperty("产品分类字典表id")
    private Integer fromTypeId;
    //属性表code
    @ApiModelProperty("属性表code")
    private String propertyCode;
    //判断是否已删除 0:未删除，1:已删除
    @ApiModelProperty("判断是否已删除 0:未删除，1:已删除")
    private Integer deleteType;
    //创建时间
    @ApiModelProperty("创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    //修改时间
    @ApiModelProperty("修改时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;
    //产品图片
    @ApiModelProperty("产品图片")
    private String pictureUrl;
    //视频id
    @ApiModelProperty("视频id")
    private String videoId;
    //文图描述地址
    @ApiModelProperty("文图描述地址")
    private String graphicIntroductionUrl;
    //视频描述地址id （阿里云视频表 vid）
    @ApiModelProperty("视频描述地址id （阿里云视频表 vid）")
    private String videoIntroductionId;
    //图片描述
    @ApiModelProperty("图片描述")
    private String imageText;
    //收藏数
    @ApiModelProperty("收藏数")
    private Integer collectNumber;
    //阅读数
    @ApiModelProperty("阅读数")
    private Integer readNumber;
    //打赏数
    @ApiModelProperty("打赏数")
    private Integer rewardNumber;
    //源产品id 转发实质是复制一条数据 该字段用于判别用户
    @ApiModelProperty("源产品id ")
    private Integer sourceUserId;
    //广告费用
    @ApiModelProperty("广告费用 ")
    private Integer advertisePrice;
    //设置转发人数 在规定人数中可得广告费用和转发人数的平均值
    @ApiModelProperty("设置转发人数 ")
    private Integer forwardNumber;
    //广告图片url
    @ApiModelProperty("广告图片url ")
    private String advertisePictureUrl;
    //广告视频id
    @ApiModelProperty("广告视频id ")
    private String advertiseVideoId;
    //广告主人名称
    @ApiModelProperty("广告主人名称")
    private String masterName;
    //广告主人头像地址
    @ApiModelProperty("广告主人名称")
    private String headImgUrl;

    public String getMasterName() {
        return masterName;
    }

    public void setMasterName(String masterName) {
        this.masterName = masterName;
    }

    public String getHeadImgUrl() {
        return headImgUrl;
    }

    public void setHeadImgUrl(String headImgUrl) {
        this.headImgUrl = headImgUrl;
    }

    public Integer getSourceUserId() {
        return sourceUserId;
    }

    public void setSourceUserId(Integer sourceUserId) {
        this.sourceUserId = sourceUserId;
    }

    public Integer getAdvertisePrice() {
        return advertisePrice;
    }

    public void setAdvertisePrice(Integer advertisePrice) {
        this.advertisePrice = advertisePrice;
    }

    public Integer getForwardNumber() {
        return forwardNumber;
    }

    public void setForwardNumber(Integer forwardNumber) {
        this.forwardNumber = forwardNumber;
    }

    public String getAdvertisePictureUrl() {
        return advertisePictureUrl;
    }

    public void setAdvertisePictureUrl(String advertisePictureUrl) {
        this.advertisePictureUrl = advertisePictureUrl;
    }

    public String getAdvertiseVideoId() {
        return advertiseVideoId;
    }

    public void setAdvertiseVideoId(String advertiseVideoId) {
        this.advertiseVideoId = advertiseVideoId;
    }

    public Integer getRewardNumber() {
        return rewardNumber;
    }

    public void setRewardNumber(Integer rewardNumber) {
        this.rewardNumber = rewardNumber;
    }

    public Integer getReadNumber() {
        return readNumber;
    }

    public void setReadNumber(Integer readNumber) {
        this.readNumber = readNumber;
    }

    public Integer getCollectNumber() {
        return collectNumber;
    }

    public void setCollectNumber(Integer collectNumber) {
        this.collectNumber = collectNumber;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getVideoId() {
        return videoId;
    }

    public void setVideoId(String videoId) {
        this.videoId = videoId;
    }
    /**
     * 设置：
     */
    public void setProductId(Integer productId) {
        this.productId = productId;
    }
    /**
     * 获取：
     */
    public Integer getProductId() {
        return productId;
    }

    public String getProductCode() {
        return productCode;
    }

    public void setProductCode(String productCode) {
        this.productCode = productCode;
    }

    /**
     * 设置：产品名称
     */
    public void setProductName(String productName) {
        this.productName = productName;
    }
    /**
     * 获取：产品名称
     */
    public String getProductName() {
        return productName;
    }
    /**
     * 设置：产品单位
     */
    public void setUnit(String unit) {
        this.unit = unit;
    }
    /**
     * 获取：产品单位
     */
    public String getUnit() {
        return unit;
    }
    /**
     * 设置：产品原价
     */
    public void setPrice(Integer price) {
        this.price = price;
    }
    /**
     * 获取：产品原价
     */
    public Integer getPrice() {
        return price;
    }
    /**
     * 设置：产品当前价格
     */
    public void setProductPrice(Integer productPrice) {
        this.productPrice = productPrice;
    }
    /**
     * 获取：产品当前价格
     */
    public Integer getProductPrice() {
        return productPrice;
    }
    /**
     * 设置：产品运费
     */
    public void setSendPrice(Integer sendPrice) {
        this.sendPrice = sendPrice;
    }
    /**
     * 获取：产品运费
     */
    public Integer getSendPrice() {
        return sendPrice;
    }
    /**
     * 设置：产品库存
     */
    public void setStock(Integer stock) {
        this.stock = stock;
    }
    /**
     * 获取：产品库存
     */
    public Integer getStock() {
        return stock;
    }
    /**
     * 设置：产品类型 1 journal 日志 2 advertisement 广告产品
     */
    public void setProductType(Integer productType) {
        this.productType = productType;
    }
    /**
     * 获取：产品类型 1 journal 日志 2 advertisement 广告产品
     */
    public Integer getProductType() {
        return productType;
    }
    /**
     * 设置：产品分类字典表id
     */
    public void setFromTypeId(Integer fromTypeId) {
        this.fromTypeId = fromTypeId;
    }
    /**
     * 获取：产品分类字典表id
     */
    public Integer getFromTypeId() {
        return fromTypeId;
    }
    /**
     * 设置：属性表code
     */
    public void setPropertyCode(String propertyCode) {
        this.propertyCode = propertyCode;
    }
    /**
     * 获取：属性表code
     */
    public String getPropertyCode() {
        return propertyCode;
    }
    /**
     * 设置：判断是否已删除 0:未删除，1:已删除
     */
    public void setDeleteType(Integer deleteType) {
        this.deleteType = deleteType;
    }
    /**
     * 获取：判断是否已删除 0:未删除，1:已删除
     */
    public Integer getDeleteType() {
        return deleteType;
    }
    /**
     * 设置：创建时间
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    /**
     * 获取：创建时间
     */
    public Date getCreateTime() {
        return createTime;
    }
    /**
     * 设置：修改时间
     */
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
    /**
     * 获取：修改时间
     */
    public Date getUpdateTime() {
        return updateTime;
    }

    public String getPictureUrl() {
        return pictureUrl;
    }

    public void setPictureUrl(String pictureUrl) {
        this.pictureUrl = pictureUrl;
    }

    /**
     * 设置：文图描述地址
     */
    public void setGraphicIntroductionUrl(String graphicIntroductionUrl) {
        this.graphicIntroductionUrl = graphicIntroductionUrl;
    }
    /**
     * 获取：文图描述地址
     */
    public String getGraphicIntroductionUrl() {
        return graphicIntroductionUrl;
    }
    /**
     * 设置：视频描述地址id （阿里云视频表 vid）
     */
    public void setVideoIntroductionId(String videoIntroductionId) {
        this.videoIntroductionId = videoIntroductionId;
    }
    /**
     * 获取：视频描述地址id （阿里云视频表 vid）
     */
    public String getVideoIntroductionId() {
        return videoIntroductionId;
    }
    /**
     * 设置：图片描述
     */
    public void setImageText(String imageText) {
        this.imageText = imageText;
    }
    /**
     * 获取：图片描述
     */
    public String getImageText() {
        return imageText;
    }

    public TbProductEntity toEntity(){
        TbProductEntity tbproductentity = new TbProductEntity();
        tbproductentity.setGraphicIntroductionUrl(this.getGraphicIntroductionUrl());
        tbproductentity.setVideoIntroductionId(this.getVideoIntroductionId());
        tbproductentity.setUserId(this.getUserId());
        tbproductentity.setVideoId(this.getVideoId());
        tbproductentity.setProductId(this.getProductId());
        tbproductentity.setProductCode(this.getProductCode());
        tbproductentity.setProductName(this.getProductName());
        tbproductentity.setUnit(this.getUnit());
        tbproductentity.setPrice(this.getPrice());
        tbproductentity.setProductPrice(this.getProductPrice());
        tbproductentity.setSendPrice(this.getSendPrice());
        tbproductentity.setStock(this.getStock());
        tbproductentity.setProductType(this.getProductType());
        tbproductentity.setFromTypeId(this.getFromTypeId());
        tbproductentity.setPropertyCode(this.getPropertyCode());
        tbproductentity.setDeleteType(this.getDeleteType());
        tbproductentity.setCreateTime(this.getCreateTime());
        tbproductentity.setUpdateTime(this.getUpdateTime());
        tbproductentity.setPictureUrl(this.getPictureUrl());
        tbproductentity.setImageText(this.getImageText());
        tbproductentity.setSourceUserId(this.getSourceUserId());
        tbproductentity.setAdvertisePrice(this.getAdvertisePrice());
        tbproductentity.setForwardNumber(this.getForwardNumber());
        tbproductentity.setAdvertisePictureUrl(this.getAdvertisePictureUrl());
        tbproductentity.setAdvertiseVideoId(this.getAdvertiseVideoId());
        return tbproductentity;
    }

}
